/* webapp/css/styles.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}
.header, .sidebar {
    background-color: #34495e;
    color: white;
}
.header {
    padding: 16px 20px;
    position: relative; /* 使内部元素可以相对定位 */
    text-align: center; /* 使中间的文本居中 */
}
.header-title {
    display: inline-block; /* 使文本居中 */
    font-size: 35px;
}

.header-right {
    position: absolute; /* 绝对定位 */
    right: 20px; /* 距离右边10px */
    top: 50%; /* 垂直居中 */
    transform: translateY(-50%); /* 垂直居中 */
}
.welcome-text {
    margin-right: 15px;
    font-size: 16px;
}
.login-link {
    color: yellow;
    text-decoration: none;
    font-size: 16px;
    transition: text-decoration 0.3s;
}
.login-link:hover {
    text-decoration: underline;
}

.sidebar {
    height: 100%;
    width: 200px;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    overflow-x: hidden;
    padding-top: 20px; /* 与头部高度一致 */
}
.sidebar a {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 18px;
    color: #f1f1f1;
    display: block;
}
.sidebar a:hover {
    background-color: #45a049;
}
.sidebar a.level-1 {
    font-weight: bold;
    color: white;
}
.sidebar a.level-2 {
    margin-left: 20px;
}
.sidebar-header img {
    height: 70px;
    display: block;
    margin: 0 auto;
    margin-bottom: 20px;
}

.main-content {
    margin-left: 220px;
    padding: 20px;
    margin-top: 0px; /* 确保内容不会被头部遮挡 */
}
.main-content h1 {
    margin-top: 0;
    color: #34495e; /* 深灰色文字 */
}
form {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
}
.form-group {
    flex: 1 1 48%; /* 每行显示两个输入框 */
    margin: 5px 1%;
}
.form-group.full-width {
    flex: 1 1 100%; /* 占满一行 */
}
label {
    display: block;
    margin-bottom: 5px;
}
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
input[type="submit"] {
    background-color: #34495e; /* 深灰色背景 */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}
input[type="submit"]:hover {
    background-color: #2ecc71; /* 浅绿色悬停背景 */
}
.form-group.submit {
    display: flex;
    justify-content: flex-end; /* 将按钮放在右侧 */
    flex: 1 1 100%; /* 占满一行 */
}
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    appearance: none; /* 移除默认的下拉箭头 */
    -webkit-appearance: none; /* 移除默认的下拉箭头 */
    -moz-appearance: none; /* 移除默认的下拉箭头 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="#333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 10px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
}
th {
    background-color: #f2f2f2;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}
tr:hover {
    background-color: #ddd;
}

/* 去除所有超链接的下划线 */
a {
    text-decoration: none;
    margin-right: 8px;
}

/* 如果需要在悬停时显示下划线，可以添加以下样式 */
a:hover {
    text-decoration: underline;
}
